    let spinning =false
    function chou(){
    let wheel = document.getElementById('wheel');
    wheel.style.transformOrigin = '50% 50%';
    if (spinning) return;
    spinning = true;
    let randomOffset = Math.floor(Math.random() * 20) + 75;
    let randomExtraRotation =1440;
    let totalRotation = randomExtraRotation + randomOffset;
    wheel.style.transform = `rotate(${totalRotation}deg)`;
    setTimeout(()=>{
    var True =document.getElementById('modulSpinner')
    True.style.display='block'
},6800)
}
    function openService() {
        var window1 = document.getElementById('textList');
        window1.style.display = 'block';
    }

    function openService2() {
        var window1 = document.getElementById('textList2');
        window1.style.display = 'block';
    }
    function closeWindow() {
        var window1 = document.getElementById('textList');
        var window2 = document.getElementById('textList2');
        var look = document.getElementById('look');
        if (window1) {
            window1.style.display = 'none';
        }
        if (window2) {
            window2.style.display = 'none';
        }
        if (look) {
            look.style.display = 'none';
        }
    }
    function toGet() {
        let str = $('#mobile').val().trim();
        if (str) {
            var myreg = /^1([3456789])\d{9}$/;
            if (!myreg.test(str)) {
                alert('手机号格式不正确');
            } else {
                const checkbox = document.getElementById('agree');
                if(checkbox.checked){
                    const params = window.location.search;  // 获取当前页面的URL参数
                    let newUrl = 'newIndex2bianxianmao.html';
                    let encodedPhone = btoa(str);
                    if (params) {
                        newUrl += params + '&phone=' + encodeURIComponent(encodedPhone);
                    } else {
                        newUrl += '?phone=' + encodeURIComponent(encodedPhone);
                    }
                    window.location.href = newUrl;
                }else{
                    alert('请先勾选下方服务条款');
                }

            }
        } else {
            alert('请先输入手机号');
        }
    }
    function toGet2() {
        window.location.href = '/lq';
    }
    function getPhoneList(){
    $.ajax({
        type: 'GET',
        url: httpUrl+'/api/v1/open/searchPhone',
        success: function(data) {
            if(data.code=='10000'){
                var phoneList =data.data;
                if(phoneList.length){
                    for (let i = 0; i < phoneList.length; i++) {
                        var rewards = [
                            '成功领取 200元话费',
                            '成功领取 100元话费',
                            '成功领取 50元话费',
                            '成功领取 30元话费',
                            '成功领取 20元话费',
                            '成功领取 10元话费'
                        ];
                        var randomReward = rewards[Math.floor(Math.random() * rewards.length)];
                        var item = phoneList[i];
                        var scrollText = document.getElementById("scrollText");
                        var span = document.createElement("span");
                        span.textContent ="恭喜 "+ item +' '+randomReward;
                        scrollText.appendChild(span);
                    }
                }
            }
        },
        error: function(xhr, status, error) {
        }
    });
}
    function statistics(){
    $.ajax({
        type: 'GET',
        url: httpUrl+'/api/v1/open/statisticsRequests',
        success: function(data) {

        },
        error: function(xhr, status, error) {
        }
    });

}
    getPhoneList()
    statistics()


